var fs = require('fs');

var data=Buffer.from("hello world");


fs.writeFile('../file/outpt.txt',data,'utf-8',function (err) {
    if(err){
        console.error(err)
    }else {
        console.log('done！')
    }
})


fs.readFile('../file/input.txt',function (err,data) {
    console.log(data);
})



fs.readFile('../file/input.txt',function (err,data) {
    fs.writeFile('../file/outpt.txt',data,'utf-8',function (err) {
        if(err){
            console.error(err)
        }else {
            console.log('done！')
        }
    })
})